# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=vala-language-server
pkgver=0.48
pkgrel=1
pkgdesc="Code Intelligence for Vala"
url="https://github.com/benwaffle/vala-language-server"
arch="all"
license="LGPL-2.1-or-later"
makedepends="meson vala json-glib-dev glib-dev libgee-dev jsonrpc-glib-dev"
subpackages="$pkgname-dbg"
source="https://github.com/benwaffle/vala-language-server/releases/download/${pkgver/_/-}/vala-language-server-${pkgver/_/-}.tar.xz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Ddefault_library=shared \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="886d3a4b29caec6fd6d2dce1f61502523b117b26c6c5ca083f116f125c49600a40a194f66abaf6712fe09ce63ba9a4cdbb24244249f201e4aa1e937b69695c6b  vala-language-server-0.48.tar.xz"
